#pragma once

#include <Engine/SceneGraph/SpatialObject.h>
#include <Engine/Renderer/RendererEnums.h>

namespace fastbird
{
	class CLASS_DECLSPEC_ENGINE IMeshObject : public SpatialObject
	{
	public:
		static IMeshObject* CreateMeshObject();

		virtual ~IMeshObject(){}

		virtual IObject* Clone() const = 0;
		virtual bool LoadOgreMesh(const char* filename) = 0;
		virtual void ClearMeshData() = 0;
		virtual void StartModification() = 0;
		virtual void AddTriangle(const Vec3& pos0, const Vec3& pos1, const Vec3& pos2) = 0;
		virtual void AddQuad(const Vec3 pos[4], const Vec3 normal[4]) = 0;
		virtual void AddQuad(const Vec3 pos[4], const Vec3 normal[4], const Vec2 uv[4]) = 0;
		virtual void SetPositions(const Vec3* p, size_t numVertices) = 0;
		virtual void SetNormals(const Vec3* n, size_t numNormals) = 0;
		virtual void SetUVs(const Vec2* uvs, size_t numUVs) = 0;
		virtual void SetIndices(const UINT* indices, size_t numIndices) = 0;
		virtual void SetIndices(const USHORT* indices, size_t numIndices) = 0;
		virtual Vec3* GetVertices(size_t& outNumVertices) = 0;
		virtual void EndModification(bool keepMeshData) = 0; // VertexComponent
		virtual void SetTopology(PRIMITIVE_TOPOLOGY topology) = 0;
		virtual PRIMITIVE_TOPOLOGY GetTopology() = 0;
	};
}